<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>会议模板增加</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all">
  <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all">
</head>
<body>

  <div class="layui-fluid">
    <div class="layui-card">
      <div class="layui-card-header">会议模板增加</div>
      <div class="layui-card-body" style="padding: 15px;">
        <form class="layui-form" action="" lay-filter="component-form-group">
          <div class="layui-form-item">
            <label class="layui-form-label">模板名称</label>
            <div class="layui-input-block">
              <input type="text" name="mtgTmplName" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
            </div>
          </div>
          <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">模板描述</label>
            <div class="layui-input-block">
              <textarea id="mtgTmplDesc" name="mtgTmplDesc" placeholder="请输入模板描述内容" class="layui-textarea"></textarea>
            </div>
          </div>
					<div class="layui-form-item">
						<label class="layui-form-label">附件</label>
						<div class="layui-input-block">
							<div class="layui-upload-drag" id="upload"
								style="padding: 78px 20px; width: 130px;">
								<i class="layui-icon"></i>
								<p>点击上传，或将文件拖拽到此处</p>
							</div>
						</div>
					</div>
					<div class="layui-form-item layui-layout-admin">
            <div class="layui-input-block">
              <div class="layui-footer" style="left: 0;">
                <button class="layui-btn" lay-submit="" lay-filter="component-form-demo1">新增/修改</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
              </div>
            </div>
          </div>
        </form>
      </div>
    </div>
  </div>
  
	<script src="../../layuiadmin/layui/layui.js"></script> 
	<script>
  layui.config({
    base: '../../layuiadmin/' //静态资源所在路径
  }).extend({
    index: 'lib/index' //主入口模块
  }).use(['index', 'form', 'upload', 'layedit'], function(){
    var $ = layui.$
    ,admin = layui.admin
    ,layer = layui.layer
    ,form = layui.form
    ,upload = layui.upload
    ,layedit = layui.layedit;
    
    layedit.build('mtgTmplDesc'); //建立编辑器
    
    //拖拽上传
    upload.render({
        elem: '#upload'
        , url: '/upload/'
        , done: function (res) {
            console.log(res)
        }
    });

    form.render(null, 'component-form-group');
    
    /* 监听提交 */
    form.on('submit(component-form-demo1)', function(data){
      parent.layer.alert(JSON.stringify(data.field), {
        title: '最终的提交信息'
      })
      return false;
    });
  });
	</script> 
</body>
</html>